package com.zzptc.sky.mytest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Timer timer=new Timer();

        TimerTask task=new TimerTask(){

            public void run(){

                Intent intent = new Intent( MainActivity.this,SecondActivity.class);

                startActivity(intent);

                overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);

            }

        };

        timer.schedule(task, 1000);
    }
}
